<?php
/*
* Footer Template
* Calls Sidebar-footer.php for bottom widgets
*/
	
	if ( get_option('above_footer_active') == '' ) update_option( 'above_footer_active', 'yes' );
		
	global $is_front_page_var;
		
	if ( get_option('content_scroller_active') == 'front_page_only' && $is_front_page_var ) content_scroller();
	if ( get_option('content_scroller_active') == 'on' ) content_scroller();

	echo '<footer id="master_footer">';
		echo '<div id="footer_wrapper" class="clearfix">';
		
            if ( get_option('above_footer_active') == 'yes' )
			{
				echo '<div id="footer_widgets" class="clearfix">';
					get_sidebar( 'footer' );
				echo '</div>';
			}
   		
			echo '<div class="wide_splitter_footer"></div>';
            
            echo '<div id="sub_footer" class="clearfix">';
                echo '<div id="sub_footer_left" class="clearfix">';
                    echo '<div class="footer_menu">';
                        wp_nav_menu(  array( 'container_class' => 'footer-menu', 'theme_location' => 'footer', 'depth' => 1, 'show_home' => true ) );
                    echo '</div>';
                    echo '<div class="copyright_text">';
                    	echo get_option( 'copyright' );
                    echo '</div>';
                echo '</div>';
    
				if ( get_option( 'footer_sharing', 'yes' ) == 'yes' )
				{
					$social_icon_class = '';
					$follow_us_class   = '';
					
					if ( get_option( 'footer_sharing_icon_size', 'small' ) == 'small' )
					{
						$social_icon_class = 'social_icon_25';
						$follow_us_class   = 'small_icons';
					}
					else
					{
						$social_icon_class = 'social_icon_30';
						$follow_us_class   = 'big_icons';
					}
					
					echo '<div id="sub_footer_right" class="clearfix">';
						
						if ( get_option( 'footer_sharing_text' ) != '' )
							echo '<span class="follow_us '.$follow_us_class.'">'.get_option( 'footer_sharing_text' ).'</span>';
				   
						if ( get_option( 'footer_sharing_twitter' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_twitter' ).'" class="'.$social_icon_class.' twitter">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
						if ( get_option( 'footer_sharing_facebook' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_facebook' ).'" class="'.$social_icon_class.' facebook">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
						if ( get_option( 'footer_sharing_google' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_google' ).'" class="'.$social_icon_class.' google">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						if ( get_option( 'footer_sharing_yahoo' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_yahoo' ).'" class="'.$social_icon_class.' yahoo">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
						if ( get_option( 'footer_sharing_skype' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_skype' ).'" class="'.$social_icon_class.' skype">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
						if ( get_option( 'footer_sharing_myspace' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_myspace' ).'" class="'.$social_icon_class.' myspace">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
						if ( get_option( 'footer_sharing_rss' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_rss' ).'" class="'.$social_icon_class.' rss">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
						if ( get_option( 'footer_sharing_deviantart' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_deviantart' ).'" class="'.$social_icon_class.' deviantart">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
						if ( get_option( 'footer_sharing_flickr' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_flickr' ).'" class="'.$social_icon_class.' flickr">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
						if ( get_option( 'footer_sharing_dribbble' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_dribbble' ).'" class="'.$social_icon_class.' dribbble">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
						if ( get_option( 'footer_sharing_youtube' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_youtube' ).'" class="'.$social_icon_class.' youtube">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
						if ( get_option( 'footer_sharing_vimeo' ) != '' )
						{
							echo '<a href="'.get_option( 'footer_sharing_vimeo' ).'" class="'.$social_icon_class.' vimeo">';
								echo '<span class="hover"></span>';
								echo '<span class="normal"></span>';
							echo '</a>';
						}
						
					echo '</div>'; // END #sub_footer_right
				} // END if ( get_option( 'footer_sharing', 'yes' ) == 'yes' )
	
	
            echo '</div>'; // END #sub_footer
			
        echo '</div><!-- #footer_wrapper -->';
	echo '</footer><!-- #master_footer -->';
	
	if ( get_option('go_to_top', 'yes') == 'yes' ) echo '<div id="to_top"></div>';
?>


</div><!-- #second_wrapper --></div><!-- #wrapper -->

<?php
	/* Always have wp_footer() just before the closing </body>
	 * tag of your theme, or you will break many plugins, which
	 * generally use this hook to reference JavaScript files.
	 */

	wp_footer();
?>

<script type="text/javascript"> if ( typeof window.Cufon == 'function' ) Cufon.now(); </script>
</body>
</html>
